package select;

import java.util.Scanner;

public class SwitchDemo {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int score;
        System.out.println("请输入考试成绩:");
        score = sc.nextInt();

        if (score > 100 || score < 0) {
            System.out.println("考试分数非法！");
            System.exit(0);
        }
        int level = score / 10;
        switch (level) {
            case 10:
            case 9:
                System.out.println("成绩优秀");
                break;
            case 8:
                System.out.println("成绩良好");
                break;
            case 7:
            case 6:
                System.out.println("成绩及格");
                break;
            default:
                System.out.println("不及格");
                break;
        }
    }
}
